/*******************************************************************************
* Project: QSAR(Cute Software Architecture) 
*
* Copyright: Copyright(C) 2024 by YuetingBen, All Rights Reserved
*
* File name: CanNmCfg.h
*
* Brief: ;
*
* Author: Yueting.Ben
*
* Module: CanNm
*
*******************************************************************************/

#ifndef CANNMCFG_H
#define CANNMCFG_H

/** HEADER FILES **/
#include "CanNmType.h"
#include "CanNmRte.h" 


/** MACRO DEFINITION **/
#define CanNmConf_PduHandleId_CanNm_Tx_Channel1_NmMessage 0u
#define CanNmConf_PduHandleId_CanNm_Tx_Max 1u


#define CANNM_PDU_OFF 0xFF
#define CANNM_PDU_BYTE_0 0x00
#define CANNM_PDU_BYTE_1 0x01


/** TYPEDEF DEFINITION **/
typedef uint8 CanNmPduNidPositionType;

typedef uint8 CanNmPduCbvPositionType;


typedef struct
{
    uint16 CanNmRxPduId;
    PduType* CanNmRxPduRef;
}CanNmRxPduType;


typedef struct
{
    PduType* CanNmTxPduRef;
    uint16 CanNmTxConfirmationPduId;
    uint16 LowLayerPduId;
}CanNmTxPduType;


typedef struct
{
    uint8 CanNmTxUserDataPduId;
    PduType* CanNmUserDataTxPdu;
}CanNmUserDataTxPduType;


typedef struct
{
    uint16 CanNmMsgReducedTime;
    uint16 CanNmMsgTimeoutTime;
    uint16 CanNmMsgCycleTime;
    uint16 CanNmRemoteSleepIndTime;
    uint16 CanNmRepeatMessageTime;
    uint16 CanNmWaitBusSleepTime;
    uint16 CanNmTimeoutTime;
    uint16 CanNmImmediateNmCycleTime;
    CanNmPduNidPositionType CanNmPduNidPosition;
    CanNmPduCbvPositionType CanNmPduCbvPosition;
    uint8 CanNmCarWakeUpBitPosition;
    uint8 CanNmCarWakeUpBytePosition;
    uint8 CanNmCarWakeUpFilterNodeId;
    uint8 CanNmImmediateNmTransmissions;
    uint8 CanNmRepeatMsgIndEnabled;
    uint8 CanNmNodeId;
    CanNmTxPduType *CanNmTxPduRef;
}CanNmChannelConfigType;


typedef struct
{
    uint8 test;
}CanNm_ConfigType;


/** LOCAL DATA DEFINITION **/
extern const CanNmChannelConfigType CanNmChannelConfig[ComStackConf_NetworkHandleId_Max];


#endif
